package com.platform.service.impl;

import com.platform.domain.model.UserSecurityKey;
import com.platform.service.UserSecurityService;
import com.platform.dao.UserSecurityDao;
import com.platform.domain.model.UserSecurity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* UserSecurity
*
* User: wangyang
* DateTime: 2012-10-08 16:11:58
*
*/
@Service("userSecurityService")
public class UserSecurityServiceImpl implements UserSecurityService {

    @Resource
    private UserSecurityDao userSecurityDao;

    /**
    *
    * 根据主键查询UserSecurity对象
    *
    * @param key
    * @return UserSecurity对象
    */
    @Override
    public UserSecurity selectByPrimaryKey(UserSecurityKey key) throws Exception {
        return userSecurityDao.selectByPrimaryKey(key);
    }

    /**
    *
    * 根据查询条件查询符合条件的UserSecurity对象
    *
    * @param userSecurity
    * @return 符合条件的UserSecurity对象List
    */
    @Override
    public List<UserSecurity> select(UserSecurity userSecurity) throws Exception {
        return userSecurityDao.select(userSecurity);
    }

    /**
    *
    * 根据主键删除UserSecurity对象
    *
    * @param key
    * @return 影响条件数
    */
    @Override
    public int deleteByPrimaryKey(UserSecurityKey key) throws Exception {
        return userSecurityDao.deleteByPrimaryKey(key);
    }

    /**
    *
    * 根据条件删除符合条件的UserSecurity对象
    *
    * @param userSecurity
    * @return 影响条件数
    */
    @Override
    public int delete(UserSecurity userSecurity) throws Exception {
        return userSecurityDao.delete(userSecurity);
    }

    /**
    *
    * 插入UserSecurity对象
    *
    * @param userSecurity
    * @return 影响条件数
    */
    @Override
    public int insert(UserSecurity userSecurity) throws Exception {
        return userSecurityDao.insert(userSecurity);
    }

    /**
    *
    * 更新UserSecurity对象
    *
    * @param userSecurity
    * @return 影响条件数
    */
    @Override
    public int update(UserSecurity userSecurity) throws Exception {
        return userSecurityDao.update(userSecurity);
    }
}
